{
  "port": 8100,
  "rewrite": [
    { "from": "/be5/*", "to": "/$1" }
  ],
  "mocks": [
    {
      "route": "/api/languageSelector",
      "response": {
        "type": "application/json",
        "body": {"languages":["RU"],"selected":"RU","messages":{"FIO":"ФИО"}}
      }
    },
    {
      "route": "/api/roleSelector",
      "response": {
        "type": "application/json",
        "body": {"availableRoles":["Administrator"],"currentRoles":["Administrator"]}
      }
    },
    {
      "route": "/api/menu",
      "response": {
        "type": "application/json",
        "body": {
          "class": "class com.developmentontheedge.be5.components.Menu$MenuResponse",
          "loggedIn": true,
          "root": [
            {"title":"Main page","default":true,"action":{"name":"call","arg":"static/welcome.be"}},
            {
              "action": null,
              "children": [
                {
                  "action": {
                    "arg": "table/testtable/Test 1D",
                    "class": "class com.developmentontheedge.be5.model.Action",
                    "name": "call"
                  },
                  "class": "class com.developmentontheedge.be5.components.Menu$QueryNode",
                  "default": false,
                  "id": null,
                  "title": "Test 1D"
                },
                {
                  "action": {
                    "arg": "table/testtable/Test 1D unknown",
                    "class": "class com.developmentontheedge.be5.model.Action",
                    "name": "call"
                  },
                  "class": "class com.developmentontheedge.be5.components.Menu$QueryNode",
                  "default": false,
                  "id": null,
                  "title": "Test 1D unknown"
                }
              ],
              "class": "class com.developmentontheedge.be5.components.Menu$RootNode",
              "default": false,
              "id": {
                "class": "class com.developmentontheedge.be5.components.Menu$Id",
                "entity": "testtable",
                "query": null
              },
              "operations": null,
              "title": "testtable"
            },
            {
              "action": null,
              "children": [
                {
                  "action": {
                    "arg": "login",
                    "class": "class com.developmentontheedge.be5.model.Action",
                    "name": "call"
                  },
                  "class": "class com.developmentontheedge.be5.components.Menu$QueryNode",
                  "default": false,
                  "id": null,
                  "title": "Login"
                }
              ],
              "class": "class com.developmentontheedge.be5.components.Menu$RootNode",
              "default": false,
              "id": {
                "class": "class com.developmentontheedge.be5.components.Menu$Id",
                "entity": "users",
                "query": null
              },
              "operations": null,
              "title": "users"
            }
          ]
        }
      }
    },
    {
      "route": "/api/appInfo",
      "response": {
        "type": "application/json",
        "body": {"title":"BeanExplorer 5 application","url":"http://127.0.0.1:8100/"}
      }
    },
    {
      "route": "/api/menu/defaultAction",
      "response": {
        "type": "application/json",
        "body": {"name":"call","arg":"static/welcome.be"}
      }
    },
    {
      "route": "/api/static/welcome.be",
      "response": {
        "type": "application/json",
        "body": {"type":"static","value":"<h1>Main page</h1><div class=\"main-content\"><p>Test static page</p><a href=\"#!form/testtable/Test1D/Insert\">#!form/testtable/Test1D/Insert</a></div>"}
      }
    },
    {
      "route": "/api/pool",
      "response": {
        "type": "application/json",
        "body": {"type":"static","value":"test"}
      }
    },
    {
      "route": "/api/document",
      "response": {
        "type": "application/json",
        "body": {"class":"class com.developmentontheedge.be5.api.impl.ResponseImpl$TypedResponse",
          "type":"table",
          "value":{
            "category":"testtable",
            "class":"class com.developmentontheedge.be5.model.TablePresentation",
            "columns":["Name","Value"],
            "hasAggregate":false,
            "length":20,
            "operations":[{"action":null,"class":"class com.developmentontheedge.be5.model.TableOperationPresentation","clientSide":false,"name":"Delete","requiresConfirmation":false,"title":"Удалить","visibleWhen":"anySelected"},{"action":null,"class":"class com.developmentontheedge.be5.model.TableOperationPresentation","clientSide":false,"name":"Edit","requiresConfirmation":false,"title":"Редактировать","visibleWhen":"anySelected"},{"action":null,"class":"class com.developmentontheedge.be5.model.TableOperationPresentation","clientSide":false,"name":"Insert","requiresConfirmation":false,"title":"Добавить","visibleWhen":"always"}],"page":"Test 1D","parameters":[],"rows":[{"cells":[{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"<a href=\"#!table/testtable/Test 1D unknown/ID=1\">test</a>","options":[{"link":{"class":"class java.util.TreeMap","empty":false}},{"quick":{"class":"class java.util.TreeMap","empty":false}}]},{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"1","options":[]}],"class":"class com.developmentontheedge.be5.components.impl.InitialRow","id":"1"},{"cells":[{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"<a href=\"#!table/testtable/Test 1D unknown/ID=2\">test</a>","options":[{"link":{"class":"class java.util.TreeMap","empty":false}},{"quick":{"class":"class java.util.TreeMap","empty":false}}]},{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"2","options":[]}],"class":"class com.developmentontheedge.be5.components.impl.InitialRow","id":"2"},{"cells":[{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"<a href=\"#!table/testtable/Test 1D unknown/ID=3\">test</a>","options":[{"link":{"class":"class java.util.TreeMap","empty":false}},{"quick":{"class":"class java.util.TreeMap","empty":false}}]},{"class":"class com.developmentontheedge.be5.components.impl.model.TableModel$CellModel","content":"test","options":[]}],"class":"class com.developmentontheedge.be5.components.impl.InitialRow","id":"3"}],
            "selectable":true,
            "title":"testtable: Test 1D",
            "totalNumberOfRows":3
          }
        }
      }
    },
    {
      "route": "/api/form",
      "response": {
        "type": "application/json",
        "body": {
          "type": "form",
          "value": {
            "bean":{
              "values": {
                "date": "2017-07-20",
                "number": "123abc",
                "agree": true,
                "select": "vanilla",
                "multiSelect": "",
                "description": "",
                "login": "",
                "pass": "password"
              },
              "meta": {
                "/date": {
                  "displayName": "Date",
                  "type": "Date"
                },
                "/number": {
                  "displayName": "Number",
                  "type": "Long",
                  "message": "number is required here",
                  "status": "error"
                },
                "/agree": {
                  "displayName": "Agree",
                  "type": "Boolean",
                  "status": "success"
                },
                "/select": {
                  "displayName": "Select",
                  "tagList": [["vanilla","Vanilla"],["chocolate","Chocolate"],["strawberry","Strawberry"],["cookiescream","Cookies and Cream"],["caramel","Caramel"],["peppermint","Peppermint"]]
                },
                "/multiSelect": {
                  "displayName": "Multi Select",
                  "multipleSelectionList": true,
                  "tagList": [["vanilla","Vanilla"],["chocolate","Chocolate"],["strawberry","Strawberry"],["cookiescream","Cookies and Cream"],["caramel","Caramel"],["peppermint","Peppermint"]]
                },
                "/description": {
                  "displayName": "Name",
                  "type": "textArea",
                  "placeholder": "field for text"
                },
                "/login": {
                  "displayName": "Name",
                  "groupId": 5,
                  "groupName": "Security"
                },
                "/pass": {
                  "displayName": "Password",
                  "type": "passwordInput",
                  "groupId": 5,
                  "status": "success"
                }
              },
              "order": [
                "/date",
                "/number",
                "/agree",
                "/select",
                "/multiSelect",
                "/description",
                "/login",
                "/pass"
              ]
            },
            "selectedRows": "0",
            "title": "Insert"
          }
        }
      }
    }

  ]
}